//#include "MainServer.h"
#include "Network\TcpClient.h"
#include <stdio.h>

using namespace std;

int main(int argc, char *argv[])
{
	//Screen screen;
	//int count = 0;
	//DWORD begin;
	//DWORD end;
	//double spendtime;
	//int n = 501;
	//begin = GetTickCount();
	//while (--n)
	//{
	//	screen.update();
	//	++count;
	//}
	//end = GetTickCount();
	//spendtime = (end - begin)/1000.0;
	//printf("%lf fps\n", count/spendtime);
	//MainServer s;
	//s.run();
	TcpClient client;
	client.connectToHost("127.0.0.1", "1234");
	int i = 0;
	char data[30];
	while (1)
	{
		memset(data, 0, 30);
		sprintf(data, "this is %d\n", i++);
		client.send(data, strlen(data)+1);
		Sleep(1000);
	}

	return 0;
}